package samsung.sds.survey.surveyStatistics.service;

import java.io.IOException;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Service;
import samsung.sds.survey.surveyStatistics.model.QualitySurveyStatisticsResultEntity;
import samsung.sds.system.common.baseQuery.BaseServiceInterface;
import samsung.sds.system.common.baseQuery.model.PageData;
import samsung.sds.system.common.model.QueryParam;

/**
 * @author dan5.li
 * @createDate 2016-02-15
 * 数字类型问卷调查统计
 */
@Service
public interface QualitySurveyStatisticsService extends  BaseServiceInterface<QualitySurveyStatisticsResultEntity>  {

	/**
	 * 根据调查ID获取所有问题列表
	 * 
	 * @param survey_Id
	 * @return
	 */
	public List<QualitySurveyStatisticsResultEntity> getSurveyQuestion(
             String survey_Id) ;

	/**
	 * 获取调查结果列表
	 * 
	 * @param survey_Id
	 * @return
	 */
	public List<QualitySurveyStatisticsResultEntity> getStatisticsList(
			QueryParam param) ;

	/**
	 * 根据分页参数分页获取调查结果列表
	 * 
	 * @param param
	 * @return
	 */
	public PageData<QualitySurveyStatisticsResultEntity> getStatisticsPageList(
			QueryParam param) ;

	/**
	 * 根据调查问卷ID和用户名获取投票时间
	 * 
	 * @param surveyId
	 * @param userName
	 * @return
	 */
	public QualitySurveyStatisticsResultEntity getVoteTime(String surveyId,
			String userName) ;
	
	/**
	 * 导出
	 * 
	 * @param request
	 * @param response
	 * @param surveyId
	 * @param map
	 * @throws IOException
	 */
	public void qualitySurveyStatisticsExport(HttpServletRequest request,
			HttpServletResponse response, String surveyId,
			Map<String, Object> map) throws IOException;
	
	/**
	 * 获取调查问卷信息
	 * 
	 * @param survey_Id
	 * @return
	 */
	public Map<String, Object> getSurveyMessage(String survey_Id);
}
